﻿<extend name="Public/Common/base.html" />
<block name="main"> <css href="__PUBLIC__/assets/css/tp.css" />
 <css href="__PUBLIC__/assets/css/app.css" />
<js href="__PUBLIC__/layer/layer.js" /><js
	href="__PUBLIC__/assets/js/jquery.min.js" /> <js
	href="__PUBLIC__/assets/js/app.js" />
<style>
#hiddentip form{
	font-size:1.4rem;
}
.am-table {
	font-size: 13px;
}

.am-time {
	width: 60%;
	height: 30px;
}

</style>

<div class="tip" id="hiddentip">
	     <div class="tipexect">
	     	<div class="zan">	
	     	<form action="" method="post">	
	     	<div class="am-text-center">
	     	   <strong id="editname"></strong>
	        </div>
			    <div class="am-form-group">
			       <label for="doc-vld-name">出差天数：</label>
			      <input type="number" id="taskdate"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">加班天数：</label>
			      <input type="number" id="taskadd"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">请假天数：</label>
			      <input type="number" id="taskleave"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">迟到次数：</label>
			      <input type="number" id="tasklate"  value="" class="am-form-field am-input-sm" required/>
			    </div>
			  <input type="hidden" id="etid" value="">
			  <div class="am-g" style="margin-top:0rem;">
			  <div class="am-u-sm-6">
			  <a  class=" am-btn am-btn-danger am-btn-block am-btn-xs" onclick="amclose()">取消</a>
			  </div>
			  <div	class="am-u-sm-6">
			   <a class="am-btn am-btn-primary am-btn-block am-btn-xs" onclick="editsure()">确定</a>
			  </div>
			  </div>					
	      </form>	
	     	</div>
	     </div>
	</div>
<div class="am-g">
	<form class="am-form">
		<div class="am-form-group am-u-sm-3 am-u-end">
			<label for="doc-select-1">选择月份:</label> <select id="getid"
				name="getid" required onchange="selecta()">
				<option value="{$month}" selected>{$month}月</option>
				<volist name="monthlist" id="vo">
				<option value="{$vo.id}">{$vo.month}月</option>
				</volist>
			</select> <span class="am-form-caret"></span> <input id="tex" type="hidden"
				name="tex" value="">
		</div>
	</form>
	<form class="am-form">
		<div class="am-u-sm-3 am-u-end">
			<label for="doc-select-1">收搜关键词:</label>
			<div class="am-input-group">
				<input type="text" id="search" name="search" class="am-form-field"
					placeholder="请输入姓名"
					onkeyup="this.value=this.value.replace(/[, ]/g,'')"> <span
					class="am-input-group-btn" onclick="searchb()">
					<button class="am-btn am-btn-default">
						<span class="am-icon-search"></span>
					</button>
				</span>
			</div>
		</div>
	</form>
	
	<div class="am-u-sm-3 am-u-end">
			<label for="doc-select-1">数据备份:</label><br>
		<if condition="$tasklist EQ $null">
		<a  class="am-btn am-btn-success am-btn-block" onclick="shbfno()">导出</a>	
		<else/>
		<a  class="am-btn am-btn-success am-btn-block" onclick="shbf()">导出</a>	
		</if>
	
    </div>
    
    <div class="am-u-sm-3 am-u-end">
		<label for="doc-select-1">导入本月所有员工:</label><br>			
	    <a  class="am-btn am-btn-primary am-btn-block" onclick="ygdr()">导入</a>								
    </div>

<div class="am-scrollable-horizontal">
	<form action="" method="post">
		<table
			class="am-table table2excel am-table-compact am-table-centered am-scrollable-horizontal am-text-nowrap   am-table-bordered">
			<thead>
			<tr >
			<th  colspan="9">
			{$year}年{$month}月
			<input type="hidden" id="monthid" value="{$month}">
			</th>	
			<th  colspan="1">
			<a class="am-btn am-btn-danger am-btn-xs" onclick="tdelete()">批量删除</a>	
			
			<a class="am-btn am-btn-primary am-btn-xs" onclick="pltotal()">批量合计</a>			
			</th>			
		   	</tr>			
				<tr>
				
				    <th><input type="checkbox"  id="xzall" onclick="turedel()" ></th>					
					<th>姓名</th>					
					<th>应出勤天数</th>
					<th>实际出勤天数</th>
					<th>出差天数</th>
					<th>加班天数</th>
					<th>请假天数</th>
					<th>迟到次数</th>
					<th>本月工资</th>
				    <th>操作</th>					
				</tr>
			</thead>
			<tbody>
				<if condition="$tasklist EQ $null">
				<tr >
			    <td colspan="10">
				<span style="color:red;">出差暂无记录</span>	
				<td>
			   </tr> 							
				<else/>							
				<volist name="tasklist" id="vv">													
				<tr>	
				   <input type="checkbox" class="cq" value="{$vv.staff_name}"  name="username" checked style="display:none;">			
				  
				   <td><input type="checkbox"  class="wsj" value="{$vv.id}" name="wsj"  ></td>				  
				   <td>{$vv.staff_name}</td>					
					<td>{$t}</td>
					<td>
						{$t+$vv.taskadd}</td>
					<td>
						<if condition="$vv.taskdate eq '0'">暂无<else />{$vv.taskdate}天</if>
						</td>
					<td>
						<if condition="$vv.taskadd eq '0'">暂无<else />{$vv.taskadd}天</if>
						</td>

					<td>{$vv.taskleave}天</td>

					<td>{$vv.tasklate}次</td>
					<td>
					<if condition="$vv.tsalary eq '0'">还未计算<else />
						{$vv.tsalary} 
					</if>
					</td>
					
					<td >
					<a  class=" am-btn am-btn-danger am-btn-xs" onclick='model("{$vv.id}")'>编辑</a>	
					<if condition="$vv.tsalary eq '0'">
					<a class="am-btn am-btn-primary am-btn-xs" onclick='total("{$vv.id}")'>合计工资</a>
					<else />
					<a class="am-btn am-btn-primary am-btn-xs am-disabled">合计工资</a>
					</if>					
						
					</td>	
									
				</tr>
				 </volist>
             </if>        
                 
			</tbody>
		</table>			
	</form>
	
</div>		
</div>

	

<js href="__PUBLIC__/assets/js/jquery1.min.js"/>
<js href="__PUBLIC__/assets/js/jquery.table2excel.js"/>


<div class="am-g am-text-center">
	 {$page}
</div>
<script>
function turedel(){	
  var checkobj = document.getElementsByName('wsj');	
  if(document.getElementById("xzall").checked==false){	 
    for(var i=0;i<checkobj.length;i++){
	  checkobj[i].checked = false;
	}  
   
  }
  else if(document.getElementById("xzall").checked==true){
    for(var i=0;i<checkobj.length;i++){
	  checkobj[i].checked = true;		 
	}
   
  } 
}

</script>



 </block>
